package com.fenghongzhang.test;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;

/**
 * 是根据测量模式和ViewGroup给出的建议的宽和高，在ViewGroup为其指定的区域内绘制出自己的形态。一般常用的方法有
 * onMesure()
 * onDraw()
 */
public class MyButton extends androidx.appcompat.widget.AppCompatButton {
    private static final String TAG = "MyButton";
    public MyButton(Context context) {
        super(context);
    }

    public MyButton(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.i(TAG, "dispatchTouchEvent: ");
        return false;
    }


    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.i(TAG, "onTouchEvent: ");
        return super.onTouchEvent(event);
    }


}
